<%@ page pageEncoding="utf-8" import="java.util.*" %>
<%@ page import="DoMain.Food" %>
<%@ page import="Dao.CriteriaFood" %>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt_rt" prefix="fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

    <title>已订餐</title>
  </head>
  <body>

    <a href="getAccount.do">点击查看已定套餐</a><br> <a href="pageOrderFood.do?currentPage=1">继续订餐</a><br>

  <%  List<Food> foods=(List<Food>)request.getAttribute("foods"); %>
  
  <table class="table table-hover">

<tr class="table-primary" align="center">

      <th scope="col" align="center">套餐名称</th>
      <th scope="col" align="center">套餐描述</th>
      <th scope="col" align="center">套餐价格</th>
      <th scope="col" align="center">订餐次数</th>
      <th scope="col" align="center">总费用/元</th>

    </tr>

 
  <c:forEach items="${foods}" var="fo">
			<tr  class="table-light">

				<td class="table-success" scope="row" align="center">${fo.foodName}</td>
				<td class="table-warning" scope="row" align="center">${fo.foodDescription}</td>
				<td class="table-warning" scope="row" align="center">${fo.foodPrice}</td>
				<td class="table-warning" scope="row" align="center">${fo.counts}</td>
				<td class="table-warning" scope="row" align="center">${fo.cost}</td>
				
				
			</tr>
			</c:forEach>		 
  	</table>
  </body>
  </html>